package cn.yangliu.poi.view;

import cn.yangliu.poi.tools.ExportUtils;
import org.apache.poi.ss.usermodel.Workbook;
import org.springframework.web.servlet.view.document.AbstractXlsView;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.LinkedHashMap;
import java.util.Map;

/**
 * 作者 杨柳
 * 创建时间 2017-09-09 00:06
 */
public class SimpleXlsView extends AbstractXlsView implements ExportUtils {
    private LinkedHashMap<String,String> mapping;

    /**
     *
     * @param mapping LinkedHashMap<标题,属性>
     */
    public SimpleXlsView(LinkedHashMap<String,String> mapping){
        this.mapping=mapping;
    }
    @Override
    protected void buildExcelDocument(Map<String, Object> model, Workbook workbook, HttpServletRequest request, HttpServletResponse response) throws Exception {
        buildExcelDocument(model,workbook,request,response,mapping);
    }
}
